import { Card, Pagination, Spin } from 'antd';
import equal from "deep-equal"
import { toJS } from 'mobx';
import ContactRemarkItem from './ContactRemarkItem'
import { WeaLocaleProvider, WeaZmage, WeaTools, WeaTextarea } from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;

export default class ContactRemarkItems extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            datas: props.datas
        }
    }
    componentWillReceiveProps(nextProps) {
        if (this.props.datas != nextProps.datas) {
            // console.log("111111");
            this.setState({ loading: true, datas: nextProps.datas })
        }
    }
    render() {
        const { datas = [], loading } = this.state;
        const { getContactLogsRemark, otherParams = {} } = this.props;
        // console.log(toJS(datas));

        return (
            <div className='crm-contact-remark-items' style={{ backgroundColor: "#f8f8f8", padding: "5px 10px", borderBottom: "1px solid #efeff4" }}>
                {datas.map((item) => {
                    return <ContactRemarkItem data={item} getContactLogsRemark={getContactLogsRemark} key={item.replyId} otherParams={otherParams} />
                })}
            </div>
        )
    }
}